For each table in your database you can specify in which order its records should be displayed. This chapter describes how you can specify an order and what consequences it has.
By default each newly created table has an empty order. This means that if you enter a new record, the created record is inserted at the current position, that is, behind the current record of the table. If you change some fields of a record, the position of the record within the table leaves unchanged.
Sometimes it is useful to have the records sorted by a certain attribute, e.g. by the `Name' attribute if the table has such one.
In MUIbase you can specify for each table a list of attributes by which its records should be sorted. All records are first sorted by the first attribute in this list. If two records are equal in an attribute then the next attribute in the list determines the order. For each attribute you can specify if the records should be sorted ascending or descending.
For determining the order of attributes the rules of the following table are used:
Type Order relation Integer NIL < MIN_INT < ... < -1 < 0 < 1 < ... < MAX_INT Choice (Choice values are treated as integers) Real NIL < -HUGE_VAL < ... < -1.0 < 0.0 < 1.0 < ... < HUGE_VAL String NIL < "" < ... < "a" < "AA" < "b" < ... Memo (String comparison is done case insensitive) Date NIL < 1.1.0000 < ... < 31.12.9999 Time NIL < 00:00:00 < ... < 23:59:59 Bool NIL < TRUE Reference NIL < any_record (Records itself are not comparable for ordering)
If you have specified an order for a table then the records are automatically rearranged whenever you add a new record or change an order relevant field of a record.
To specify an order list for the current table select menu item `Table - Change order'. This will open a window containing
To enter a new order list, first press the `Clear' button. Then use drag & drop as described above to build up a new list of attributes. If you want to have an empty order then just don't add any attributes to the order list.
When you are done specifying the order list, press the `Ok' button. MUIbase will then reorder all records of the table. As this can need some time, a busy mouse pointer will appear.
Go to the first, previous, next, last section, table of contents.